* {
    box-sizing: border-box;
}

li {
    list-style: none;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    /* 050 北方大雪纷飞 */
    background-image: linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%);
}

.phone {
    position: relative;
    overflow: hidden;
    width: 320px;
    /* 高度=图片450+导航60 */
    height: 510px;
    border: solid 2px lightgray;
    border-radius: 15px;
}

/* 图片 */
.phone .content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 60px);
    object-fit: cover;
    /* 关键点:让活动的图片显示,而其他图片隐藏 */
    opacity: 0;
    transition: opacity .4s ease;
}

.phone .content.show {
    opacity: 1;
}

/* 导航栏 */
nav {
    position: absolute;
    bottom: 0;
    left: 0;
    margin-top: -5px;
    width: 100%;
}

nav ul {
    /* 无序列表有默认:上下外边距16px,左内边距40px */
    display: flex;
    margin: 0;
    padding: 0;
    height: 60px;
    background-color: #fff;
}

nav ul li {
    flex: 1;
    padding: 10px;
    color: #555;
    text-align: center;
    cursor: pointer;
}

/* 字体 */
nav ul li p {
    font-size: 12px;
    margin: 2px 0;
}

nav ul li:hover,
nav ul li.active {
    color: coral;
}